package com.leju.common.dao.impl;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;

/**
 * 封装数据库操作
 * 
 * @author Administrator liuwei
 * @param <M>
 */
public interface DAO<M> {
	public void insert(M m);

	public void update(M m);

	public void delete(Serializable id);

	public List<M> findAll();

	public M findById(Serializable id);

	public int totleCount();
	
	public boolean deleteAll();
	
	public void dropTable();
	
	public ArrayList<M> findBySpecifiedConditions(String[] conditions);
	


	public ArrayList<M> findBySpecifiedValue(Serializable key, Serializable value);
	
	public void deleteByParams(Map<String, String> map);
}
